package com.joysuch.wwyt.workflow.enums;

import java.util.*;

/**
 * @Author ZhaoQiuWei
 * @Date 2021/8/18 18:33
 */
public enum LocationVerifyStateEnum {

    POINT_IN_AREA(0, "校验正常-区域内","blue"),
    POINT_OUT_AREA(1, "校验异常-区域外","yellow"),
    LAST_POINT_NOT_IN_MAX_TIME_RANGE(2, "最近一个点位不在时间范围内","grey"),
    NO_LAST_POINT(3, "最近一个点位无数据","grey"),
    INCONSISTENT_FLOOR(4, "楼层不一致","yellow"),
    SN_NOT_EXIST(5, "sn号不存在","grey");

    private Integer value;
    private String description;
    private String exLevel;

    LocationVerifyStateEnum(Integer value, String description,String exLevel) {
        this.value = value;
        this.description = description;
        this.exLevel = exLevel;
    }

    public final Integer getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public String getExLevel() {
        return exLevel;
    }

    private static final Map<Integer, LocationVerifyStateEnum> lookup = new HashMap<>();

    static {
        for (LocationVerifyStateEnum e : EnumSet.allOf(LocationVerifyStateEnum.class)) {
            lookup.put(e.value, e);
        }
    }

    public static LocationVerifyStateEnum find(Integer value) {
        return lookup.get(value);
    }
}
